package com.datacans.app.response;


/**
 * @author young
 * @desc 接口返回
 **/
public enum DatacansResponse {
    SUCCESS(12000, "请求成功"),
    FAIL(13000, "请求失败"),

    UNAUTHORIZED(401, "该请求未被授权"),
    METHOD_NOT_ALLOWED(405, "请求中指定的方法不被允许"),
    NOT_FOUND(404, "没有找到");

    private int code;
    private String message;
    private Object data;

    DatacansResponse(int code, String message) {
        this(code, message, null);
    }

    DatacansResponse(int code, String message, Object data) {
        this.code = code;
        this.data = data;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}

